#ifndef DECODER_H_
#define DECODER_H_

#include <string>
#include <fstream>
#include <nds.h>

#include "fileinfo.h"

class Decoder {

public:
	virtual fileInfo getInfo() = 0;
	virtual bool checkFormat(std::string filepath) = 0;
	
	virtual void fillBuffers(int16_t *buffer_l, int16_t *buffer_r, uint32_t samples) = 0;
	virtual void prprForPlayback(fileInfo info) = 0;
	virtual bool reachedEnd() = 0;
	virtual void toFirstSample() = 0;
	virtual uint32_t getCurrentFrame() = 0;
};

class DecoderFactory {

public:
	static Decoder* getDecoderByFile(std::string filepath);
	static Decoder* getDecoderByType(std::string type);
};

#endif /* DECODER_H_ */
